package com.hod.roommap.client.model;

import com.gwtext.client.core.Position;
import com.gwtext.client.data.Record;
import com.gwtext.client.widgets.form.FieldSet;
import com.gwtext.client.widgets.form.FormPanel;

public abstract class HODForm extends FormPanel{
	
	protected GearsDataStore ds;
	
	public HODForm(GearsDataStore ds) {
		super();
		this.ds = ds;
		setFrame(true);
		setLabelAlign(Position.LEFT);
		setPaddings(5);
		setAutoHeight(true);
		setAutoWidth(true);
		// TODO Auto-generated constructor stub
	}
	
	public abstract void updateDataControls(Record record);
	protected abstract FieldSet createFieldSet();
	protected abstract void createButtons();
	public abstract void setObject(GearsDataObject object);
	
    public void loadRecord(Record record){
    	getForm().loadRecord(record);
    	updateDataControls(record);
    }
    

}
